<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
  <head>
    <%@include file="common.jsp"%> 
    <title>测试管理</title>
	<meta http-equiv="cache-control" content="no-cache">
	<link rel="stylesheet" type="text/css" href="resources/css/common.css">
	<script type="text/javascript" src="resources/js/framejs/jquery.form.js"></script>  
	<script type="text/javascript" src="resources/js/test.js"></script>  
	<script type="text/javascript">
		var testTypeId='<%=request.getParameter("testTypeId")%>';
	</script>
	<style type="text/css">
		#tab_list img{height: 30px;}
		#tab_list td{line-height:30px;}
	</style>
  </head>
  <body>
   	<div class="content">
   		<h4>试卷管理</h4>
   		<hr/>
	    <!-- 工具栏 -->
   		<div class="tools">
   			<div class="btn_left">
	 	    	<button id="btn_add" type="button" class="btn btn-success"  data-toggle="modal" data-target="#modal_add"><i class="icon icon-plus"></i> 增加</button>
	    	    <button id="btn_edit" type="button" class="btn btn-warning"><i class="icon icon-edit"></i> 修改</button>
	    	    <button id="btn_del" type="button" class="btn btn-danger"><i class="icon icon-minus"></i> 删除</button>
	    	    <button id="btn_top" type="button" class="btn btn-primary"><i class="icon icon-long-arrow-up"></i> 置顶</button>
   			</div>
	    </div>
	    
	    <!-- 列表 -->	    
	    <table id="tab_list" class="table table-hover table-striped mytable">
			<thead>
				<tr>
					<th style="width: 35px;"><input id="pkall" type='checkbox' class='checkbox'></th>
					<th style="width: 50px;">序号</th>
					<th>标题</th>
					<th>内容</th>
					<th>类型logo</th>
					<th>总测试次数</th>
					<th>上传时间</th>
					<th>测试url</th>
				</tr>
			</thead>
			<tbody>
				
			</tbody>
	  	 </table>
	  	<!-- 分页信息条 -->
	  	<div id="pagebar" class="pagebar">
		  	<ul class="pager">
		  		
			</ul>
			<p id="page_info" class="page_info">显示第<span>0</span>到第<span>0</span>条记录,共<span>0</span>条</p>
	  	</div>
	  </div>
	   
	  <!-- 增加 -->
	  <div class="modal fade bs-example-modal-lg" id="modal_add" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
		  <div class="modal-dialog modal-lg">
		    <div class="modal-content">
		      <div class="modal-header">
		        <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
		        <h4 class="modal-title" id="myModalLabel">增加测试</h4>
		      </div>
		      <div class="modal-body">
		         <form id="form_add" class="form-horizontal" role="form">
						<div class="form-group">
							<label class="col-sm-2 control-label required">测试名称</label>
							<div class="col-sm-10">
								<input type="text" name="title" class="form-control"
									placeholder="请填写测试标题" data-toggle="tooltip" data-placement="top"
									title="请输入长度不超过20个字符的测试标题">
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label required">测试名称</label>
							<div class="col-sm-10">
								<input type="text" name="content" class="form-control"
									placeholder="请填写测试内容" data-toggle="tooltip" data-placement="top"
									title="请输入长度不超过100个字符的测试内容">
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label required" >测试基数</label>
							<div class="col-sm-10">
								<input type="text" name="testCount" class="form-control" maxlength="11"
									placeholder="基数为数字" data-toggle="tooltip" data-placement="top"
									title="测试人数基数不能为空并且必须为数字">
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label required">测试页面的url</label>
							<div class="col-sm-10">
								<input type="text" name="url" class="form-control"
									placeholder="测试页面的url" data-toggle="tooltip"
									data-placement="top" title="请输入正确的url格式">
							</div>
						</div>
					</form>
		        <form id="form_add2" class="form-horizontal" action="common/upload" method="post" enctype="multipart/form-data">
					  <div class="form-group">
				          <label class="col-sm-2 control-label required">logo</label>
				          <div class="col-sm-10">
				             <input type="file" name="file" placeholder="请选择图片..."  data-toggle="tooltip" data-placement="top" title="请上传图片文件">
				          </div>
			          </div>
					  <div class="form-group" style="display:none;">
				          <div class="col-sm-2"></div>
				          <div class="col-sm-10">
				              <a href="" target="_blank">
				              	 <img id="logo_scan" alt="" src="" style="height: 150px;">
				              </a>
				          </div>
			          </div>
		         </form>
		      </div>
		      <div class="modal-footer">
		          <button id="btn_confirm_add" type="button" class="btn btn-primary">确定</button>
		          <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
		      </div>
		    </div>
	   </div>
	</div>
	
	  <!-- 修改 -->
	  <div class="modal fade bs-example-modal-lg" id="modal_edit" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
		<div class="modal-dialog modal-lg">
			<div class="modal-content">
	      		<div class="modal-header">
	        		<button type="button" class="close" data-dismiss="modal">
		        		<span aria-hidden="true">&times;</span>
		        		<span class="sr-only">Close</span>
	        		</button>
	        		<h4 class="modal-title" id="myModalLabel">修改测试信息</h4>
	      		</div>
	      		<div class="modal-body">
	         		<form id="form_edit" class="form-horizontal" role="form" action="test/modify" method="post">
	         	  		<input type="hidden" id="edit_id" name="id">
	         	  		<input type="hidden" id="edit_uploadTime" name="uploadTime">
				  		<div class="form-group">
				    		<label class="col-sm-2 control-label required">测试标题</label>
				    		<div class="col-sm-10">
				      			<input type="text" name="title" class="form-control" placeholder="请填写测试标题" data-toggle="popover" data-placement="top" title="请输入长度不超过20个字符的测试标题">
				    		</div>	
				  		</div>
				  		<div class="form-group">
				    		<label class="col-sm-2 control-label required">测试内容</label>
				    		<div class="col-sm-10">
				      			<input type="text" name="content" class="form-control" placeholder="请填写测试内容" data-toggle="popover" data-placement="top" title="请输入长度不超过100个字符的测试内容">
				    		</div>
				  		</div>
						<div class="form-group">
							<label class="col-sm-2 control-label required">测试基数</label>
							<div class="col-sm-10">
								<input type="text" name="testCount" class="form-control" maxlength="11"
									placeholder="基数为数字" data-toggle="tooltip" data-placement="top"
									title="测试人数基数不能为空并且必须为数字">
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label required">测试页面的url</label>
							<div class="col-sm-10">
								<input type="text" name="editUrl" class="form-control"
									placeholder="测试页面的url" data-toggle="tooltip"
									data-placement="top" title="请输入正确的测试页面的url">
							</div>
						</div>
					</form>
					<form id="form_edit2" class="form-horizontal"
						action="common/upload" method="post" enctype="multipart/form-data">
						<div class="form-group">
							<label class="col-sm-2 control-label required">logo</label>
							<div class="col-sm-10">
								<input type="file" name="file" placeholder="请选择图片..."
									data-toggle="tooltip" data-placement="top" title="请上传图片文件">
							</div>
						</div>
						<div class="form-group" style="display:none;">
							<div class="col-sm-2"></div>
							<div class="col-sm-10">
								<a href="" target="_blank"> <img id="logo_scan2" alt=""
									src="" style="height: 150px;"> </a>
							</div>
						</div>
					</form>
				</div>
				<div class="modal-footer">
					<button id="btn_confirm_edit" type="button" class="btn btn-primary">确定</button>
					<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
				</div>
			</div>
		</div>
	</div>
  </body>
</html>